// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

.bbcode-spoilerbox {
  @_padding-left: 20px;
  --link-icon: @fa-var-angle-right;

  &.js-spoilerbox--open {
    --link-icon: @fa-var-angle-down;
  }

  &__body {
    display: none;
    margin-top: 10px;
    padding-left: @_padding-left;
  }

  &__link {
    .reset-input();
    .link-default();
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
    font-weight: bold;
    width: max-content;
    max-width: 100%;

    &:hover {
      text-decoration: underline;
    }
  }

  &__link-icon {
    width: @_padding-left;
    display: block;
    flex: none;

    &::before {
      .fas();
      content: var(--link-icon);
      color: @osu-colour-c1;
      display: inline-block;
      text-align: left;
    }
  }
}
